const CracoAntDesignPlugin = require("craco-antd");
const path = require("path");
module.exports = {
  webpack: {
    alias: {
      "@": path.resolve("src"),
    },
    loaders: [
      {
        test: /\.css$/,
        loader: "style-loader!css-loader?modules",
      },
    ],
  },
  plugins: [
    {
      plugin: CracoAntDesignPlugin,
      options: {
        customizeTheme: {
          "@primary-color": "#1890FF",
          "@font-size-base": "16px",
        },
      },
    },
  ],
  devServer: {
    port: 3000,
    proxy: {
      "/api": {
        target: "http://localhost:8848",
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
        logLevel: "debug",
      },
    },
  },
};
